oracle.pg.text.lucene

## Class OracleDirectory

- java.lang.Object
- - oracle.pg.text.lucene.OracleDirectory

-     public class OracleDirectory
      extends Object

  This class manages Lucene Directory objects.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `OracleDirectory.DirectoryType` It denotes the type of directories for storing Lucene indexes.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OracleDirectory(String directoryName, org.apache.lucene.store.Directory[] directories)` Constructs an OracleDirectory object.
    `OracleDirectory(String directoryName, OracleDirectory.DirectoryType directoryType, String[] locations, int numSubDirs)` Constructs an OracleDirectory object.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Closes the Oracle Directory and all its sub-directories.
    `OracleDirectory.DirectoryType` | `getDirectoryType()` Get the directory type of this OracleDirectory
    `static OracleDirectory` | `getFSOracleDirectory(String directoryName, String[] locations)` Creates an `OracleDirectory` object using FSDirectory for the specified number of sub-directories.
    `static OracleDirectory` | `getFSOracleDirectory(String directoryName, String[] location, int numSubDirs)` Creates an `OracleDirectory` object using FSDirectory sub-directories.
    `static OracleDirectory` | `getInstance(String directoryName, org.apache.lucene.store.Directory[] directories)` Creates an `OracleDirectory` object from the specified set of sub-directories.
    `org.apache.lucene.store.Directory` | `getSubDirectory(int index)` Gets the `Directory` object associated to the specified sub-directory.
    `int` | `size()` Gets the number of sub-directories handled by this OracleDirectory.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### OracleDirectory

          public OracleDirectory(String directoryName,
                         org.apache.lucene.store.Directory[] directories)
                          throws IOException

      Constructs an OracleDirectory object.
      Parameters:
        `directoryName` - the name of this directory.
        `directories` - a `Directory` array object.
      Throws:
        `IOException`

    - #### OracleDirectory

          public OracleDirectory(String directoryName,
                         OracleDirectory.DirectoryType directoryType,
                         String[] locations,
                         int numSubDirs)
                          throws OracleIndexException

      Constructs an OracleDirectory object.
      Parameters:
        `directoryName` - the name of this directory.
        `directoryType` - the type of Directories to use (FS, MMap, JDBC)
        `locations` - the location(s) where the sub-directories will be created.
        `numSubDirs` - the number of sub-directories to use in this Directory.
      Throws:
        `OracleIndexException`

  - ### Method Detail

    - #### close

          public void close()

      Closes the Oracle Directory and all its sub-directories.

    - #### getDirectoryType

          public OracleDirectory.DirectoryType getDirectoryType()

      Get the directory type of this OracleDirectory

    - #### getFSOracleDirectory

          public static OracleDirectory getFSOracleDirectory(String directoryName,
                                             String[] locations)
                                                      throws OracleIndexException

      Creates an `OracleDirectory` object using FSDirectory for the specified number of sub-directories.
      Parameters:
        `directoryName` - the name of this directory.
        `locations` - the file path where the sub-directories will rely.
      Returns:
        a `Directory` object.
      Throws:
        `OracleIndexException`

    - #### getFSOracleDirectory

          public static OracleDirectory getFSOracleDirectory(String directoryName,
                                             String[] location,
                                             int numSubDirs)
                                                      throws OracleIndexException

      Creates an `OracleDirectory` object using FSDirectory sub-directories.
      Parameters:
        `directoryName` - the name of this directory.
        `location` - the location(s) where the sub-directories will be created.
        `numSubDirs` - the number of sub-directories to use in this directory.
      Returns:
        an `OracleDirectory` object.
      Throws:
        `IOException`
        `OracleIndexException`

    - #### getInstance

          public static OracleDirectory getInstance(String directoryName,
                                    org.apache.lucene.store.Directory[] directories)
                                             throws IOException

      Creates an `OracleDirectory` object from the specified set of sub-directories.
      Parameters:
        `directoryName` - the name of this directory.
        `directories` - an array of `Directory`.
      Returns:
        an `OracleDirectory` object.
      Throws:
        `IOException`

    - #### getSubDirectory

          public org.apache.lucene.store.Directory getSubDirectory(int index)
                                                            throws OracleIndexException

      Gets the `Directory` object associated to the specified sub-directory.
      Parameters:
        `index` - the number of the sub-directory to retrieve.
      Returns:
        a `Directory` object.
      Throws:
        `OracleIndexException`

    - #### size

          public int size()

      Gets the number of sub-directories handled by this OracleDirectory.
      Returns:
        the number of sub-directories handled by this OracleDirectory.

Copyright © 2015 Oracle and/or its affiliates. All Rights Reserved.